from tests.pytests.helpers.codegen_helpers import compile_chunk, assert_code_contains


def test_bool_ops():
    def check(a: int, b: int, c: int) -> bool:
        return (a < b and b < c) or (a == c)

    block = compile_chunk(check)
    assert_code_contains(
        block,
        """
        bool check(int a, int b, int c) {
            return (a < b && b < c) || (a == c);
        }
        """,
    )
